Skip to content

feat(pipeline): replace Mastra workflow with @calca/pipeline package - #34

Open
espetro wants to merge 3 commits into
mainfrom
feat/pipeline-migration
Open

feat(pipeline): replace Mastra workflow with @calca/pipeline package#34
espetro wants to merge 3 commits into
mainfrom
feat/pipeline-migration

Conversation

@espetro

@espetro espetro commented Aug 20, 2026

Copy link
Copy Markdown
Owner

Summary

  • Extracts the design pipeline (plan/layout/images/review/critique) out of apps/server's Mastra-based workflow into a standalone @calca/pipeline package with its own streaming implementation
  • Drops the @mastra/* dependency entirely
  • Bumps AI SDK to v7: @ai-sdk/anthropic ^4, @ai-sdk/google ^4, @ai-sdk/openai-compatible ^3, @ai-sdk/provider ^4, ai ^7
  • Switches cache-key hashing from Node's crypto.createHash to crypto.subtle for cross-runtime compatibility

Closes #28

Test plan

  • bunx turbo typecheck test --filter=@app/core --filter=@calca/pipeline --filter=@app/server — all green
  • @app/core 33 tests, @calca/pipeline 2 tests, @app/server 19 tests all passing
  • Manual E2E via LM Studio (no mocks): started apps/server + apps/web dev servers, configured LM Studio as an OpenAI-compatible provider through Settings UI, submitted a design prompt, confirmed the SSE stream ran through plan → layout stages and a design frame rendered on the canvas with 0 console errors

Exact pin 4.0.23 shadowed the hoisted 4.0.26 that ai@6.0.175 requires,
breaking @app/core's image generation module at runtime (missing
isNonNullable export). Use caret range so bun dedupes to one copy.
Extracts the design pipeline (plan/layout/images/review/critique) out of
apps/server's Mastra-based workflow into a standalone @calca/pipeline
package with its own streaming implementation, dropping the @mastra/*
dependency. Bumps AI SDK to v7 (@ai-sdk/anthropic ^4, @ai-sdk/google ^4,
@ai-sdk/openai-compatible ^3, @ai-sdk/provider ^4, ai ^7) and switches
cache-key hashing from Node's crypto.createHash to crypto.subtle for
cross-runtime compatibility.

Closes #28
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying calca with  Cloudflare Pages  Cloudflare Pages

Latest commit: cc104d5
Status: ✅  Deploy successful!
Preview URL: https://5906e4a5.calca-5u3.pages.dev
Branch Preview URL: https://feat-pipeline-migration.calca-5u3.pages.dev

View logs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: pipeline migration - Mastra to @calca/pipeline, AI SDK v7 (PR3)

1 participant